<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>宝钢彩涂板管理后台</title>
    <link rel="stylesheet" href="/static/css/normalize.css">
	<link rel="stylesheet" href="/static/css/add.css">
	<link rel="stylesheet" href="/static/css/color-style.css">
	<link rel="stylesheet" href="/static/css/font-awesome.min.css">
    <script type="text/javascript" src="/static/js/jquery-1.11.1.min.js"></script>
</head>
<body>
<form action="{:Url('authFun/edit','id='.$role_arr.id)}" method="post" >
	<div class="form-box">
		<div class="top-bar">
			<h5 class="nav-title">修改权限角色</h5>
			<div class="button-container">
				<button type="button" class="button -green center lst" style="width: 60px; height: 28px; line-height: 10px; font-size: 13px;">返回</button>
			</div>
		</div>
		<div class="batch-table">
			<div class="aps-grid-row">
				<div class="aps-grid-col">
					<label for=""><span class="red-color"></span>角色名称：</label>
				</div>
				<div class="aps-grid-col-lg-18">
					<input type="text" name="role_name" placeholder="" class="input-one" value="{$role_arr.role_name}">
				</div>
				<div class="clear"></div>
			</div>
			<div class="aps-grid-row">
				<div class="aps-grid-col">
					<label for=""><span class="red-color"></span>权限列表：</label>
				</div>
				<div class="clear"></div>
			</div>
			{foreach $nav_arr as $key => $value }
				<div class="aps-grid-row">
					<div class="aps-grid-col">
						{in name="$value.id" value="$role_arr.role_res"}
							<label for=""><input type="checkbox" name="role_res[]" value="{$value.id}" checked> {$value.nav_name}</label>
						{else/}
							<label for=""><input type="checkbox" name="role_res[]" value="{$value.id}" > {$value.nav_name}</label>
						{/in}
					</div>
					<div class="aps-grid-col-lg-18">
						{neq name="$value.child" value=""}
						{foreach $value.child as $k => $v}
							{in name="$v.id" value="$role_arr.role_res"}
								<input type="checkbox" name="role_res[]" value="{$v.id}" checked> {$v.nav_name}
							{else/}
								<input type="checkbox" name="role_res[]" value="{$v.id}"> {$v.nav_name}
							{/in}&nbsp;
						{/foreach}
						{/neq}
					</div>
					<div class="clear"></div>
				</div>
			{/foreach}
			<div class="aps-grid-row">
				<div class="aps-grid-col">
				</div>
				<div class="aps-grid-col-lg-18">
					<div class="button-container">
						<button type="submit" class='button -green center'>提交</div>
					</div>
				</div>
				<div class="clear"></div>
			</div>
		</div>
	</div>
</form>
</body>
<script>
    $('.lst').click(function(){
        window.location.href="{:Url('auth/lst')}";
    })

</script>
</html>